-
Notifications
You must be signed in to change notification settings - Fork 387
feat: add support for 'mpx' language in Vue framework #1346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds support for the 'mpx' language ID by updating the Vue framework’s recognized language identifiers and registering 'mpx' in the global LanguageId mapping. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/utils/LanguageId.ts (1)
24-24: Fix ESLint quote-props violation for 'mpx'.ESLint reports “Inconsistently quoted property 'mpx'.” Quote the key (or align the rule/project style). Minimal fix:
- mpx: 'mpx', + 'mpx': 'mpx',Please run the linter to confirm. If your config is
quote-props: ["error", "consistent-as-needed"], the original form should be valid—adjust the rule or keep the quoted form consistently across this object as per repo conventions.src/frameworks/vue.ts (1)
30-31: Enable auto‑extraction for.mpxfiles.Without updating
supportAutoExtraction, auto extraction won’t trigger for Mpx SFCs.Suggested change (outside this hunk):
supportAutoExtraction = ['vue', 'mpx']Also consider expanding
detection.packageJSONfor Mpx projects (e.g., @mpxjs/* packages) so the framework activates even when Vue deps aren’t present. Please verify the exact package names used in typical Mpx setups before adding them.
📜 Review details
Configuration used: Repository: lokalise/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
src/frameworks/vue.ts(1 hunks)src/utils/LanguageId.ts(1 hunks)
🧰 Additional context used
🪛 ESLint
src/utils/LanguageId.ts
[error] 24-24: Inconsistently quoted property 'mpx' found.
(quote-props)
🔇 Additional comments (1)
src/frameworks/vue.ts (1)
30-31: Great: 'mpx' added to Vue language IDs.This will enable Vue rules on
.mpxfiles. LGTM.Confirm the VS Code language id for
.mpxfiles is indeedmpxin your environment.
Feat
This PR adds support for the Mpx front-end framework, whose syntax is similar to Vue, and its i18n usage is also consistent with Vue.
Since the current plugin does not provide configuration options for such language frameworks, the goal here is to modify the source code to enable support.
Summary by CodeRabbit